package com.zycfc.zsf.boot.distributedlock.enums;

public enum DistributedLockTypeEnum
{
    REDIS, 
    ZOOKEEPER;
    
    private static final String NOT_SUPPORT_LOCK_TYPE = "\u4e0d\u652f\u6301\u7684\u5206\u5e03\u5f0f\u9501\u7c7b\u578b\uff1a";
    
    public static void check(final String distributedLockType) {
        for (final DistributedLockTypeEnum item : values()) {
            if (item.name().equals(distributedLockType)) {
                return;
            }
        }
        throw new IllegalArgumentException("\u4e0d\u652f\u6301\u7684\u5206\u5e03\u5f0f\u9501\u7c7b\u578b\uff1a" + distributedLockType);
    }
}
